<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>医生值班表</title>
    <link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css" />
    <link href="<%=basePath%>/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="<%=basePath%>/js/jquery.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/rl.js"></script>
    <script type="text/javascript">

        function deletes(id){
            window.location.href = "<%=basePath%>DocdelController?id="+id;
        }
        $(function(){
            $('tbody tr:odd').addClass("trLight");
            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>
<body>
<div id="contentWrap">
    <form action="<%=basePath%>doczbListController" method="post" name="form1">
    <!--表格控件 -->
    <div id="widget table-widget">
        <div class="pageTitle">医生值班管理</div>
        <div class="querybody">
            <ul class="seachform">
                <li><label>医生ID</label><input name="docid" type="text" class="scinput" /></li>
                <li><label>日期</label><input type="text" id="days" name="dutyday" onClick="SelectDate(this.name)" class="scinput"/></li>
                <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
            </ul>
        </div>
        <div class="pageColumn">
            <div class="pageButton"><a href="<%=basePath%>doc/doczbadd.jsp"><img src="<%=basePath%>/images/t01.png" title="新增"/></a><span>医生值班列表</span></div>
            <table>
                <thead>
                <th width="">值班ID</th>
                <th width="">医生ID</th>
                <th width="">日期</th>
                <th width="">操作</th>
                </thead>
                <tbody>
                <c:forEach items="${pageInfo.list}" var="doczb" >
                <tr>
                    <td>${doczb.ddid}</td>
                    <td>${doczb.docid}</td>
                    <td>
                        <fmt:formatDate value="${doczb.dutyday}" pattern="yyyy-MM-dd"/>
                    </td>
                    <td>
                        <a onclick="deletes('${doczb.ddid}')"><img src="<%=basePath%>images/icon/del.png" width="16" height="16" /></a>
                    </td>
                </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div><!-- #widget -->
    <div id="pagination" style="align:right;margin-top:-10px;">
        <div id='project_pagination' class="pagination pagination-centered">
            <div class="pagination">
                <ul>
                    <li><a href="javascript:void(0);" onclick="gotoPage(1)">首页</a></li>
                    <li><a href="javascript:void(0);" onclick="gotoPage(${pageInfo.pageNum-1})">上一页</a></li>
                    <li><a href="javascript:void(0);" onclick="gotoPage(${pageInfo.pageNum+1})">下一页</a></li>
                    <li><a href="javascript:void(0);" onclick="gotoPage(${pageInfo.pages})">尾页</a></li>
                </ul>
                <ul>
                    <li><span>共&nbsp;&nbsp;${pageInfo.total} 条记录&nbsp;&nbsp;</span></li>
                    <li><span>当前显示第&nbsp;${pageInfo.pageNum }&nbsp;页</span></li>
                </ul>
            </div>
        </div>
    </div>
    </form>
</div>
</body>
</html>
